import  { createStore ,applyMiddleware ,compose} from "redux"
// 创建一个仓库
// 引入 reducer
import rootReducer from "./reducer"
// 引入redux-thunk
import thunk from 'redux-thunk'
const enhancer = compose(applyMiddleware(thunk),(window &&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__) ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__() : (f) => f,)

const store = createStore(rootReducer,
  enhancer
)
export default store